<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('员工信息维护列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>员工姓名：</label>
                                <input type="text" name="name"/>
                            </li>
                            <li class="select-time">
                                <label>面试日期：</label>
                                <input type="text" class="time-input" id="startApplyDate" placeholder="开始日期" name="params[beginApplyDate]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endApplyDate" placeholder="结束日期" name="params[endApplyDate]"/>
                            </li>
                            <li class="select-time">
                                <label>入职日期：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始日期" name="params[beginBaseDate]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束日期" name="params[endBaseDate]"/>
                            </li>
                            <li>
                                <label>宿舍：</label>
                                <select name="dormitoryFlag" th:with="type=${@dict.getType('sys_yes_no')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>社保：</label>
                                <select name="insuranceFlag" th:with="type=${@dict.getType('sys_yes_no')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>结算方式：</label>
                                <select name="payType" th:with="type=${@dict.getType('pay_type')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>在职：</label>
                                <select name="workStatus" th:with="type=${@dict.getType('worker_status')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>

                            <li>
                                <label>班次：</label>
                                <select name="classType" th:with="type=${@dict.getType('work_type')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:info:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:info:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:info:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:info:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:info:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:info:remove')}]];
        var sexDatas = [[${@dict.getType('sys_user_sex')}]];
        var dormitoryFlagDatas = [[${@dict.getType('sys_yes_no')}]];
        var insuranceFlagDatas = [[${@dict.getType('sys_yes_no')}]];
        var payTypeDatas = [[${@dict.getType('pay_type')}]];
        var workStatusDatas = [[${@dict.getType('worker_status')}]];
        var classTypeDatas = [[${@dict.getType('work_type')}]];
        var bodyCheckDatas = [[${@dict.getType('body_check_status')}]];
        var prefix = ctx + "system/info";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "员工信息维护",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'name',
                    title: '员工姓名'
                },
                {
                    field: 'factory',
                    title: '工厂',
                    visible: false
                },
                {
                    field: 'idNo',
                    title: '证件号码',
                    visible: false
                },
                {
                    field: 'sex',
                    title: '性别',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(sexDatas, value);
                    }
                },
                {
                    field: 'dept',
                    title: '部门'
                },
                {
                    field: 'position',
                    title: '岗位'
                },
                {
                    field: 'phoneNo',
                    title: '手机号'
                },
                {
                    field: 'baseDate',
                    title: '入职日期'
                },
                {
                    field: 'age',
                    title: '员工年龄'
                },
                {
                    field: 'dormitoryFlag',
                    title: '是否住宿舍',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(dormitoryFlagDatas, value);
                    }
                },
                {
                    field: 'dormitoryAddr',
                    title: '宿舍地址'
                },
                {
                    field: 'address',
                    title: '户籍地址'
                },
                {
                    field: 'baseWage',
                    title: '基本工资'
                },
                {
                    field: 'bank',
                    title: '银行'
                },
                {
                    field: 'acctNo',
                    title: '银行卡'
                },
                {
                    field: 'line',
                    title: '线体'
                },
                {
                    field: 'level',
                    title: '员工级别'
                },
                {
                    field: 'type',
                    title: '员工属性'
                },
                {
                    field: 'insuranceFlag',
                    title: '是否交社保',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(insuranceFlagDatas, value);
                    }
                },
                {
                    field: 'education',
                    title: '学历'
                },
                {
                    field: 'nation',
                    title: '民族'
                },
                {
                    field: 'natively',
                    title: '籍贯'
                },
                {
                    field: 'payType',
                    title: '结算方式',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(payTypeDatas, value);
                    }
                },
                {
                    field: 'workStatus',
                    title: '在职状态',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(workStatusDatas, value);
                    }
                },
                {
                    field: 'applyDate',
                    title: '面试日期'
                },
                {
                    field: 'cancelDate',
                    title: '离职日期'
                },
                {
                    field: 'birthday',
                    title: '出生日期'
                },
                {
                    field: 'classType',
                    title: '班次',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(classTypeDatas, value);
                    }
                },
                {
                    field: 'source',
                    title: '招聘来源'
                },
                {
                    field: 'bodyCheck',
                    title: '体检状态',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(bodyCheckDatas, value);
                    }
                },
                {
                    field: 'email',
                    title: '邮件'
                },
                {
                    field: 'addr',
                    title: '地址'
                },
                {
                    field: 'superior',
                    title: '直接上级'
                },
                {
                    field: 'superiorPhone',
                    title: '直接上级电话'
                },
                {
                    field: 'urgentName',
                    title: '紧急联系人'
                },
                {
                    field: 'urgentPhone',
                    title: '紧急联系人电话'
                },
                {
                    field: 'hourWage',
                    title: '小时工资'
                },
                {
                    field: 'overtimeWage',
                    title: '加班工资'
                },
                {
                    field: 'extField1',
                    title: '备用1'
                },
                {
                    field: 'extField2',
                    title: '备用2'
                },
                {
                    field: 'extField3',
                    title: '备用3'
                },
                {
                    field: 'remark',
                    title: '备注'
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>